package com.blb.controller;

import com.blb.entity.Keyword;
import com.blb.service.IKeywordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class WelcomeController {

    @Autowired
    private IKeywordService keywordService;

    /**
     * 前台主页
     * @param model
     * @return
     */
    @RequestMapping("")
    public String frontLogin(Model model) {

        return "redirect:/front/frontUser/goindex";
    }

    /**
     * 后台登录
     * @return
     */
    @RequestMapping("backLogin")
    public String backLogin(){
        return "login";
    }

    @RequestMapping("{modules}Page")
    public String page(@PathVariable("modules") String modeles) {
        return modeles;
    }

    @RequestMapping("{modules}/{methos}Page")
    public String page2(@PathVariable("modules") String modeles, @PathVariable("methos") String methos) {
        return modeles + "/" + methos;
    }
}
